package com.sw.study.presisence.sqlsession.sessionfactory;

import java.util.List;

/**
 * Created by sw on 2020/3/25.
 */
public interface SqlSession {
    /**
     * 查询所有
     * @param statementId
     * @param params
     * @param <E>
     * @return
     */
    public <E> List<E> selectList(String statementId,Object...params )throws Exception ;

    /**
     * 查询单个
     * @param statementId
     * @param params
     * @param <T>
     * @return
     */
    public <T> T selectOne(String statementId,Object...params)throws Exception ;
    public int execute(String statementId, Object... params) throws Exception;

    /**
     *
     * @param mapperClass
     * @param <T>
     * @return
     */
    public <T> T getMapper(Class<?> mapperClass);

}
